part of '../index.dart';

class RoomSearchModel {
  String? roomName;
  String? roomIcon;
  String? countryUrl;
  String? slogan;
  String? roomCategoryName;
  String? roomCategoryColor;
  int? scoreWeight;
  String? categoryTypeIcon;
  String? roomCategoryIcon;
  String? roomNo;

  RoomSearchModel({
    this.roomNo,
    this.roomName,
    this.roomIcon,
    this.countryUrl,
    this.slogan,
    this.roomCategoryName,
    this.roomCategoryColor,
    this.scoreWeight,
    this.categoryTypeIcon,
    this.roomCategoryIcon,
  });

  RoomSearchModel.fromJson(Map<String, dynamic> json) {
    roomName = json['roomName'];
    roomNo = json['roomNo'];
    roomIcon = json['roomIcon'];
    countryUrl = json['countryUrl'];
    slogan = json['slogan'];
    roomCategoryName = json['roomCategoryName'];
    roomCategoryColor = json['roomCategoryColor'];
    scoreWeight = int.tryParse('${json['scoreWeight']}');
    categoryTypeIcon = json['categoryTypeIcon'];
    roomCategoryIcon = json['roomCategoryIcon'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};

    data['roomNo'] = roomNo;
    data['roomName'] = roomName;
    data['roomIcon'] = roomIcon;
    data['countryUrl'] = countryUrl;
    data['slogan'] = slogan;
    data['roomCategoryName'] = roomCategoryName;
    data['roomCategoryColor'] = roomCategoryColor;
    data['scoreWeight'] = scoreWeight;
    data['categoryTypeIcon'] = categoryTypeIcon;
    data['roomCategoryIcon'] = roomCategoryIcon;
    return data;
  }
}
